package com.cynteka.cyfoman.ui;

import com.cynteka.cyfoman.core.config.ActionsMD;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import java.io.FileInputStream;
import java.io.IOException;

/**
 * User: ukman
 * Date: 14.07.2011
 * Time: 12:28:21
 */
public class Util2 {
    public static ActionsMD readActionsMD() throws JAXBException, IOException {
        JAXBContext context = JAXBContext.newInstance(ActionsMD.class);
        FileInputStream fis = new FileInputStream(Parameters.getActionsFileName());
        Unmarshaller um = context.createUnmarshaller();
        ActionsMD res = (ActionsMD) um.unmarshal(fis);
        return res;
    }

}
